﻿// JScript File

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;

function cleartext(variableInputId)
	{
			testId = variableInputId.id;
			document.getElementById(testId).value="";
	}






/*
function greylinks() {

var anchorTags = document.getElementsByTagName("a");
var imgsrc = document.getElementById('mainimg').src;
	for (var i = 0; i < anchorTags.length ; i++)
	{
		if (anchorTags[i].href.indexOf(imgsrc.substring(30)) == -1 && anchorTags[i].href.indexOf("javascript:") != -1){
			anchorTags[i].style.color = "#CCCCCC";
		} else if (anchorTags[i].href.indexOf(imgsrc.substring(30)) > -1 && anchorTags[i].href.indexOf("javascript:") != -1){
			anchorTags[i].style.color = "#000000";
			document.getElementById('titletext').childNodes[1].innerHTML = anchorTags[i].innerHTML;
		}
	}
}
*/


function swapimage2(imgName) {

var imgNameSrc = imgName.childNodes[0].attributes[0].nodeValue
var imgNameSrcArray = imgNameSrc.split(".")

var newImgSrc = imgNameSrcArray[0].substr(0, (imgNameSrcArray[0].length - 1))

newImgSrc = newImgSrc + "." + imgNameSrcArray[1]

document.getElementById('mainimage').childNodes[1].attributes[0].nodeValue= newImgSrc

}

function setFilename(fullpath){
var lastSlash = fullpath.value.lastIndexOf('\\')+1;

//alert(fullpath.value.substring(lastSlash));
document.getElementById('cvfilename').value=fullpath.value.substring(lastSlash);


}